home *** CD-ROM | disk | FTP | other *** search
- head 1.4;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @@;
-
-
- 1.4
- date 91.03.10.13.43.28; author kupfer; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 91.03.10.11.18.36; author shirriff; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 88.12.30.10.28.03; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.12.22.13.22.27; author ouster; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.4
- log
- @Add -fsreset command.
- @
- text
- @' $Header: /sprite/src/cmds/vmcmd/RCS/vmcmd.man,v 1.3 91/03/10 11:18:36 shirriff Exp Locker: kupfer $ SPRITE (Berkeley)
- .so \*(]ltmac.sprite
- .HS VMCMD cmds
- .BS
- .SH NAME
- vmcmd \- set virtual memory parameters.
- .SH SYNOPSIS
- \fBvmcmd \fR[\fIoptions\fR]
- .SH OPTIONS
- .IP "\fB\-a \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then the virtual memory system is forced to
- always refuse any file system requests for memory.
- .IP "\fB\-A \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then the virtual memory system is forced
- to always satisfy any file system request for
- memory as long as it is possible.
- .IP "\fB\-c \fIpagesToCheck\fR" 20
- The number of pages to check during each interation
- of the clock algorithm is set to \fIpagesToCheck\fR .
- .IP "\fB\-C \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then copy-on-write is enabled.
- .IP "\fB\-f \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then pages are freed as soon as they are
- cleaned.
- .IP "\fB\-F \fIpenalty\fR" 20
- If \fIpenalty\fR is less than zero then the file system is forced to pay
- a penalty of -\fIpenalty\fR seconds when asking for a page. If it is
- greater than or equal to zero then the penalty is used in
- conjunction with the \fB\-n\fR option.
- .IP "\fB\-fsreset\fR" 20
- Reset the recorded minimum and maximum size of the file system cache
- to the current size.
- .IP "\fB\-x \fIsegNum\fR" 20
- Segment \fIsegNum\fR is flushed from memory; the \fB\-h\fR and
- \fB\-l\fR options can be used to set upper and lower bounds respectively
- on the pages that are flushed.
- .IP "\fB\-h \fIpageNum\fR" 20
- The highest page that can be flushed is \fIpageNum\fR when using
- \fB\-x\fR option.
- .IP "\fB\-l \fIflagValue\fR" 20
- The lowest page that can be flushed is \fIpageNum\fR when using
- \fB\-x\fR option.
- .IP "\fB\-n \fInumGroups\fR" 20
- The number of groups to divide memory into when assessing a penalty is set to
- \fInumGroups\fR.
- .IP "\fB\-p \fIpageOutProcs\fR" 20
- The number of processes used to write back pages is set to \fIpageOutProcs\fR.
- .IP "\fB\-P \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then pre-fetching is turned on.
- .IP "\fB\-r \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then pages that are copied because of
- copy-on-reference faults are made read-only until they get modified.
- .IP "\fB\-R \fIflagValue\fR" 20
- If \fIflagValue\fR is non-zero then the virtual memory system will try
- to take advantage of the file system's read ahead policy.
- .IP "\fB\-s \fInumSeconds\fR" 20
- The number of seconds between iterations of the clock algorithm is set to
- be \fInumSeconds\fR.
- .IP "\fB\-t \fItracesPerSec\fR" 20
- Virtual memory tracing is turned on at the rate of \fItracesPerSec\fR
- traces per second.
- .IP "\fB\-T\fR" 20
- Virtual memory tracing is turned off.
- .IP "\fB\-e n [ -X n2 ]\fR" 20
- Hook for extra commands. This executes \fIVm_Cmd(n,n2)\fP, with \fIn2\fP
- defaulting to 0.
- .BE
-
- .SH INTRODUCTION
- .LP
- This command sets various parameters of the virtual memory system. It
- is implemented using the Vm_Cmd system call. It controls behavior of
- the virtual memory system in 7 areas: virtual memory and file system
- negotiation, virtual memory tracing, the speed of the clock algorithm,
- flushing of segments, prefetch, copy-on-write and other miscellaneous
- things.
- .SH "VM-FS NEGOTIATION"
- .LP
- There are four options to \fBvmcmd\fR that can be used to control the
- negotiation between the virtual memory system and the file system.
- The most interesting are the options which allow the file system
- to be penalized relative to the virtual memory system.
- The \fB\-F\fR and \fB\-n\fR options are
- used to control the penalty. The simplest way to penalize the file system
- is to supply the \fB\-F \fIpenalty\fR option with a negative number.
- In this case the file system is penalized by the absolute value of
- \fIpenalty\fP each time that it asks for memory. The penalty is assessed
- by adding \fIpenalty\fP seconds to the access time of each VM page so that
- the VM pages seem to have been used more recently than they really have.
- .LP
- The \fB\-n \fInumGroups\fR option gives a more complex method of penalizing the
- file system. With this option the number of available pages are divided
- up into \fInumGroups\fR groups. When the file system asks for memory
- the penalty depends on how many pages that it already has. Its
- penalty is assessed as
- .sp
- .in +0.5i
- (\fIcurrent-number-of-pages\fR / \fInumGroups\fR) * \fIpenalty\fP
- .in -0.5i
- .sp
- seconds.
- .LP
- There are two other ways to effect the VM-FS negotiation. The \fB\-a\fR
- option can be used to force the virtual memory system to always refuse to
- give memory to the file system. The \fB\-A\fR can be used to force the
- virtual memory sysytem to always satisfy the file system's requests for
- memory as long as they are feasible. These options are designed to be used
- to determine the effect of different polices on VM and FS negotiation.
- .SH "TRACING"
- .LP
- The virtual memory system has the ability to trace segment creation
- and destruction, reference and modify bit use, page faults
- and copy-on-write behavior. Tracing is turned on with \fB\-t \fItracePerSec\fR
- option. Once tracing is turned on everything but the reference
- and modify bit traces will be traced as it occurs. However,
- the reference and modify bits are traced by scanning the hardware page maps
- \fItracePerSec\fR times per second. The output of the trace is stored in
- the file ``/sprite/vmtrace/tfile.\fIhost-id\fR'' where \fIhost-id\fR is the
- sprite id for the host. Tracing is terminated with the \fB\-T\fR option.
- .SH CLOCK
- .LP
- The virtual memory system keeps all pages in approximate least-recently-used
- (LRU) order by using a version of the clock algorithm. The clock algorithm
- is implemented by scanning a given number of pages in memory every few
- seconds. The number of pages that are scanned can be set with the
- \fB\-c \fIpagesToCheck\fR option and how often the pages are scanned
- can be set with the \fB\-s \fInumSeconds\fR option. The result is that
- \fIpagesToCheck\fR pages are checked every \fInumSeconds\fR.
- .SH FLUSHING
- .LP
- In order to allow measurement of the performance of
- the virtual memory system, \fBvmcmd\fR allows segments to be flushed from memory.
- When a segment is flushed dirty pages are written to swap
- space and the pages in the segment are removed from memory. The
- \fB\-x \fIsegNum\fR option is used to specify which segment to flush and
- the \fB\-l \fIlowPageNum\fR and \fB\-h \fIhighPageNum\fR options are used to
- specify the range of pages to flush. By default the lowest page to flush
- is the lowest page in the segment and the highest is the highest page in
- the segment. However, the \fB\-l\fR or \fB\-h\fR
- options can be used to set the lowest page to \fIlowPageNum\fR and the
- highest to \fIhighPageNum\fP respectively.
- .SH PREFETCH
- .LP
- Both the virtual memory system and the file system implement prefetch.
- Virtual memory prefetch can be turned on or off by using the
- \fB\-P \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
- prefetching is enabled and if it is zero prefetching is disabled. Likewise
- whether or not the virtual memory system takes advantage of the file
- system's prefetech can be determined with the \fB\-R \fIflagValue\fR option;
- non-zero means use FS prefetch, 0 means don't use it.
- .SH COPY-ON-WRITE
- .LP
- Copy-on-write can be turned on or off by using the \fB\-C \fIflagValue\fR
- option. If \fIflagValue\fR is non-zero then
- copy-on-write is enabled and if it zero copy-on-write is disabled.
- .SH MISCELLANEOUS
- .LP
- There are two other parameters of the virtual memory system that
- can be set with \fBvmcmd\fR. The number of processes that are used to
- write out dirty pages can be set with the \fB\-p \fIpageOutProcs\fR option.
- Whether or not memory is freed once it gets to the front of the allocate
- list or it is left alone until it has to be recycled is controlled with the
- \fB\-f \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
- pages are freed once they are cleaned and if it is zero
- pages remain on the front of the allocate list after they are cleaned.
- .SH KEYWORDS
- virtual memory
- @
-
-
- 1.3
- log
- @Added -e,-X flags.
- @
- text
- @d1 1
- a1 1
- ' $Header: /sprite/src/cmds/vmcmd/RCS/vmcmd.man,v 1.2 88/12/30 10:28:03 ouster Exp Locker: shirriff $ SPRITE (Berkeley)
- d30 3
- @
-
-
- 1.2
- log
- @More format upgrades.
- @
- text
- @d1 1
- a1 1
- ' $Header: /a/newcmds/vmcmd/RCS/vmcmd.man,v 1.1 88/12/22 13:22:27 ouster Exp Locker: ouster $ SPRITE (Berkeley)
- d61 3
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d1 1
- a1 1
- ' $Header: vmcmd,v 1.1 88/08/16 09:55:15 nelson Exp $ SPRITE (Berkeley)
- d10 1
- a10 1
- .IP "\fB-a \fIflagValue\fR" 20
- d13 1
- a13 1
- .IP "\fB-A \fIflagValue\fR" 20
- d17 1
- a17 1
- .IP "\fB-c \fIpagesToCheck\fR" 20
- d20 1
- a20 1
- .IP "\fB-C \fIflagValue\fR" 20
- d22 1
- a22 1
- .IP "\fB-f \fIflagValue\fR" 20
- d25 1
- a25 1
- .IP "\fB-F \fIpenalty\fR" 20
- d29 4
- a32 4
- conjunction with the \fB-n\fR option.
- .IP "\fB-x \fIsegNum\fR" 20
- Segment \fIsegNum\fR is flushed from memory; the \fB-h\fR and
- \fB-l\fR options can be used to set upper and lower bounds respectively
- d34 1
- a34 1
- .IP "\fB-h \fIpageNum\fR" 20
- d36 2
- a37 2
- \fB-x\fR option.
- .IP "\fB-l \fIflagValue\fR" 20
- d39 2
- a40 2
- \fB-x\fR option.
- .IP "\fB-n \fInumGroups\fR" 20
- d43 1
- a43 1
- .IP "\fB-p \fIpageOutProcs\fR" 20
- d45 1
- a45 1
- .IP "\fB-P \fIflagValue\fR" 20
- d47 1
- a47 1
- .IP "\fB-r \fIflagValue\fR" 20
- d50 1
- a50 1
- .IP "\fB-R \fIflagValue\fR" 20
- d53 1
- a53 1
- .IP "\fB-s \fInumSeconds\fR" 20
- d56 1
- a56 1
- .IP "\fB-t \fItracesPerSec\fR" 20
- d59 1
- a59 1
- .IP "\fB-T\fR" 20
- d73 1
- a73 1
- There are four options to vmcmd that can be used to control the
- d77 1
- a77 1
- The \fB-F\fR and \fB-n\fR options are
- d79 1
- a79 1
- is to supply the \fB-F \fIpenalty\fR option with a negative number.
- d85 1
- a85 1
- The \fB-n \fInumGroups\fR option gives a more complex method of penalizing the
- d97 1
- a97 1
- There are two other ways to effect the VM-FS negotiation. The \fB-a\fR
- d99 1
- a99 1
- give memory to the file system. The \fB-A\fR can be used to force the
- d107 1
- a107 1
- and copy-on-write behavior. Tracing is turned on with \fB-t \fItracePerSec\fR
- d113 1
- a113 1
- sprite id for the host. Tracing is terminated with the \fB-T\fR option.
- d120 2
- a121 2
- \fB-c \fIpagesToCheck\fR option and how often the pages are scanned
- can be set with the \fB-s \fInumSeconds\fR option. The result is that
- d126 1
- a126 1
- the virtual memory system, vmcmd allows segments to be flushed from memory.
- d129 2
- a130 2
- \fB-x \fIsegNum\fR option is used to specify which segment to flush and
- the \fB-l \fIlowPageNum\fR and \fB-h \fIhighPageNum\fR options are used to
- d133 1
- a133 1
- the segment. However, the \fB-l\fR or \fB-h\fR
- d140 1
- a140 1
- \fB-P \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
- d143 1
- a143 1
- system's prefetech can be determined with the \fB-R \fIflagValue\fR option;
- d147 1
- a147 1
- Copy-on-write can be turned on or off by using the \fB-C \fIflagValue\fR
- d153 2
- a154 2
- can be set with vmcmd. The number of processes that are used to
- write out dirty pages can be set with the \fB-p \fIpageOutProcs\fR option.
- d157 1
- a157 1
- \fB-f \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
- @
-